import type {JobPost, Pagination, Resume, ResumeReport} from "../vite-env";
import {HttpService} from "../assets/Http.ts";

export default class JobSeekerService {

    async getResumePages(jobSeekerId: number): Promise<Resume[]> {
        return (await HttpService.get("/jobSeeker/resume", {job_seeker_id: jobSeekerId})).data;
    }
    async loadJobs(): Promise<JobPost[]> {
        return (await HttpService.get("/recruiter/allJobs")).data;
    }
    async applyJobPost(jobSeekerId: number, jobPostId: number, resumeId: number): Promise<ResumeReport> {
        return (await HttpService.post("/jobSeeker/applyJobPost", {
            job_seeker_id: jobSeekerId, job_post_id: jobPostId, resume_id: resumeId
        })).data
    }
}